System and method that compensate for rotations of textures defined by parametric texture maps

ABSTRACT

A texture mapping system comprises memory and a texture map manager. The memory stores a parametric texture map, and the parametric texture map has a plurality of texels. Each of the texels defines a variable expression that defines a luminosity parameter as a function of light direction. The texture map manager is configured to perform a rotation of a texture defined by the parametric texture map, and the texture map manager is further configured to adjust the variable expression of at least one of the texels to compensate for the rotation.

BACKGROUND OF THE INVENTION Related Art

Texture mapping typically involves mapping a source image, referred toas a “texture,” onto a surface of a graphical object. The texture isnormally defined by a texture map having a plurality of point elements,referred to as “texels.” Each texel comprises one or more colorcomponent values and a set of texel coordinates. Each color componentvalue is indicative of one of the texel's color components (e.g., red,green, or blue), and the texel coordinates are indicative of the texel'sposition within the texture.

During texture mapping, a texture mapper receives graphical data (e.g.,primitives) defining a surface of a graphical object, and the texturemapper maps the pixels of the object's surface to the texels of thetexture map. In this regard, based on a pixel's coordinate values, thetexture mapper maps the pixel to one or more corresponding texels of thetexture map. If there is only one corresponding texel, then the texturemapper assigns the color component values of the one corresponding texelto the pixel. If there are multiple corresponding texels, then thetexture mapper interpolates color component values from the colorcomponent values of the corresponding texels and then assigns theinterpolated color component values to the pixel. The color componentvalues assigned to the different pixels by the texture mapper are thenutilized to color the object's surface when the object is displayed by adisplay device, such as a display monitor or a printer, for example.Moreover, the surface of the displayed object appears to have a texturethat corresponds to the source image defined by the aforedescribedtexture map.

Employing texture mapping generally facilitates the creation of morecomplex and realistic images. In this regard, when texture mappingtechniques are employed, it is not necessary for the primitives of agraphical object to define the texture of the object's surface, therebyreducing the amount of graphical data included in the primitives. Thus,storage and processing of the primitives are generally facilitated.During rendering, a graphics adapter can take a texture map defining asmall image of a complex texture and, using various techniques, such astiling, for example, apply the texture to the surface of the graphicalobject such that the object's surface appears to be textured accordingto the source image defined by the texture map.

Indeed, utilizing conventional texture mapping techniques, graphicaldisplay systems have efficiently produced fairly realistic and compleximages. However, techniques for further improving the texturedappearance of graphical objects are generally desirable.

SUMMARY OF THE INVENTION

The present invention generally pertains to a texture mapping system andmethod that compensate for rotations of textures defined by parametrictexture maps.

A texture mapping system in accordance with one embodiment of thepresent invention comprises memory and a texture map manager. The memorystores a parametric texture map, and the parametric texture map has aplurality of texels. Each of the texels defines a variable expressionthat defines a luminosity parameter as a function of light direction.The texture map manager is configured to perform a rotation of a texturedefined by the parametric texture map, and the texture map manager isfurther configured to adjust the variable expression of at least one ofthe texels to compensate for the rotation.

A texture mapping method in accordance with one embodiment of thepresent invention comprises rotating a texture defined by a parametrictexture map, the parametric texture map having a plurality of texels,each of the texels defining a variable expression that defines aluminosity parameter as a function of light direction, and compensatingthe variable expression of at least one of the texels for the rotating,wherein the compensating comprises adjusting the variable expression ofat least one of the texels based on an angle of rotation of the texture.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention can be better understood with reference to the followingdrawings. The elements of the drawings are not necessarily to scalerelative to each other, emphasis instead being placed upon clearlyillustrating the principles of the invention. Furthermore, likereference numerals designate corresponding parts throughout the severalviews.

FIG. 1 is a block diagram illustrating a texture map generating andediting system in accordance with an exemplary embodiment of the presentinvention.

FIG. 2 is a diagram illustrating a side view of an image capture unit,such as is depicted in FIG. 1.

FIG. 3 is a diagram illustrating a bottom view of an image capture unit,such as is depicted in FIG. 2.

FIG. 4 is a block diagram illustrating a printed circuit board, such asis depicted in FIG. 2.

FIG. 5 is a diagram illustrating a three-dimensional view of a sampleobject that may be positioned underneath a dome structure, such as isdepicted in FIG. 2.

FIG. 6 is a diagram illustrating a side view of the sample objectdepicted in FIG. 5.

FIG. 7 is a diagram illustrating a top view of the sample objectdepicted in FIG. 5.

FIG. 8 is a diagram illustrating a three dimensional plot of a datapoint indicative of a measured luminosity and an angle of incidence fora texel of an image of the sample object depicted in FIG. 5.

FIG. 9 is a block diagram illustrating a graphical display system inaccordance with an exemplary embodiment of the present invention.

FIGS. 10 and 11 illustrate a flow chart depicting an exemplary processfor generating a PTM in accordance with an exemplary embodiment of thepresent invention.

FIG. 12 illustrates a flow chart depicting an exemplary process forperforming texture mapping in accordance with an exemplary embodiment ofthe present invention.

FIGS. 13 and 14 illustrate a flow chart depicting an exemplary processfor generating a PTM having color component luminosity equations inaccordance with an exemplary embodiment of the present invention.

FIG. 15 illustrates a flow chart depicting an exemplary process forperforming texture mapping in accordance with an exemplary embodiment ofthe present invention.

FIG. 16 illustrates a flow chart depicting an exemplary process forrotating a texture defined by a parametric texture map in accordancewith an exemplary embodiment of the present invention.

DETAILED DESCRIPTION

Graphical display systems are often used to generate simulated images ofphysical objects. However, some physical objects possess certaincharacteristics that are difficult for a graphical display system toaccurately simulate. For example, an object sometimes has a surface thatdoes not appear to respond to changes in light directions in ahomogenous fashion across the object's surface. More specifically, theluminosity of one point on an object's surface may appear to behavedifferently, based on light position, than the luminosity of anotherpoint on the object's surface.

For example, if a light source is positioned at an angle (α) relative toa first point on the object's surface and is moved to an angle (β)relative to the first point, the luminosity of the first point mayappear to change in a particular manner as the light source is beingmoved from angle (α) to angle (β). However, if the light source ispositioned at the same angle (α) relative to a second point on theobject's surface and is moved to the same angle (β) relative to thesecond point, the luminosity of the second point may appear to change inan entirely different manner as the light source is being moved fromangle (α) to angle (β).

Such a phenomena is not always noticeable to a viewer and is often morepronounced for less homogenous surfaces. As an example, many clothfabrics have several different threads of different sizes and colorsinterwoven together and have a surface that is substantiallynon-homogenous. Moreover, the luminosity behavior of objects coveredwith such cloth material often appears to change as the position of thelight source illuminating the objects changes.

Conventional texture mapping systems typically do not attempt to accountfor the aforedescribed phenomena when applying a texture to a surface ofa graphical object. In this regard, typical texel values in aconventional texture map are constant color values and, in particular,do not account for the fact that different texels of a texture definedby the texture map may, in reality, appear to respond to light in adifferent manner than other texels. A texture mapping system inaccordance with a preferred embodiment of the present invention, on theother hand, accounts for the phenomena that different texels of thetexture defined by a texture map may appear to respond to light in adifferent manner as a light source is moved relative to the texels.Thus, more realistic graphical images are possible.

In this regard, FIG. 1 depicts a texture map generating and editingsystem 30 in accordance with a preferred embodiment of the presentinvention. As shown by FIG. 1, the system 30 preferably comprises atexture map manager 32 for generating and editing a parametric texturemap (PTM) 34. As will be described in more detail hereafter, each texelof the PTM 34 preferably comprises at least one polynomial textureequation that allows the texel's luminosity value to be calculated as afunction of light position or some other variable parameter. As usedherein, a texel's “luminosity value” refers to a value indicative of atleast the texel's brightness. In this regard, a texel's luminosity valuemay only indicate brightness or may indicate another luminosityparameter combined with the texel's brightness. For example, aluminosity value be a value that is indicative of a texel's brightness,independent of the texel's color, or a luminosity value, in anotherexample, may be a value indicative of both color and brightness.

Note that the texture map manager 32 can be implemented in software,hardware, or any combination thereof. In a preferred embodiment, asillustrated by way of example in FIG. 1, the texture map manager 32,along with its associated methodology, is implemented in software andstored in memory 42 of the texture map generating and editing system 30.

Further note that the texture map manager 32, when implemented insoftware, can be stored and transported on any computer-readable mediumfor use by or in connection with an instruction execution system,apparatus, or device, such as a computer-based system,processor-containing system, or other system that can fetch and executeinstructions. In the context of this document, a “computer-readablemedium” can be any means that can contain, store, communicate,propagate, or transport a program for use by or in connection with theinstruction execution system, apparatus, or device. The computerreadable-medium can be, for example but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, device, or propagation medium. Note that thecomputer-readable medium could even be paper or another suitable mediumupon which the program is printed, as the program can be electronicallycaptured, via for instance optical scanning of the paper or othermedium, then compiled, interpreted or otherwise processed in a suitablemanner if necessary, and then stored in a computer memory. As anexample, the texture map manager 32 may be magnetically stored andtransported on a conventional portable computer diskette.

A preferred embodiment of the graphical display system 30 of FIG. 1comprises one or more conventional processing elements 46, such as adigital signal processor (DSP) or a central processing unit (CPU), thatcommunicate to and drive the other elements within the system 30 via alocal interface 51, which can include one or more buses. Furthermore, aninput device 54, for example, a keyboard or a mouse, can be used toinput data from a user of the system 30, and an output device 56, forexample, a screen display or a printer, can be used to output data tothe user.

In a preferred embodiment, the texture map manager 32 controls an imagecapture unit 58 for capturing a plurality of images of an object. Aswill be described in more detail below, for each captured image, theobject is preferably lit by a light source from a different direction.The texture map manager 32 preferably analyzes the captured images togenerate the PTM 34. Each texel of the PTM 34 may comprise colorcomponent values, which each represent one of the texel's colorcomponents. In a preferred embodiment, each texel comprises red (R),green (G), and blue (B) color component values, although colorcomponents other than red, green, and blue may be utilized in otherembodiments.

In addition to the color component values, each texel also may comprisedata defining a polynomial texture equation, also referred to herein asa “luminosity equation,” representing the texel's luminosity behavior asa function of light direction. As will be described in more detailbelow, each luminosity equation is preferably based on a measure ofluminosity values at a corresponding pixel of the captured images.

In this regard, each texel preferably corresponds to a particular set ofpixel coordinates of the captured images. Further, to determine apolynomial texture equation for a texel, the texture map manager 32 maydetermine, for each of the captured images, the luminosity value of thepixel at the texel's corresponding set of coordinates. The determinedluminosity values, referred to as “sample luminosity values,” mayindicate both color and brightness and may be averaged to determine thetexel's color component values. In this regard, the red, green, and bluecolor component values (R, G, and B) assigned to the texel mayrespectively correspond to the red, green, and blue color components ofthe averaged luminosity value (i.e., the value averaged from the sampleluminosity values). Furthermore, based on the foregoing sampleluminosity values, the texture map manager 32 also may determine thetexel's polynomial texture equation as a function of light position.

Such a polynomial texture equation preferably represents the luminositybehavior of the texel as the position of a light source illuminating thetexel changes. Note that the polynomial texture equations of differenttexels may be different, thereby enabling the texture map manager 32 toestablish a different luminosity behavior for different texels. Indeed,by assigning different texture equations to different texels, themanager 32 is able to account for the phenomena that different points ofa non-homogenous surface may appear to respond differently to changes inlight direction. As a result, a more realistic image of a graphicalobject may be produced when the PTM 34 is applied to the object'ssurface.

An exemplary methodology for generating the PTM 34 will now be describedin more detail. In this regard, the image capture unit 58, operatingunder the direction and control of the texture map manager 32,preferably captures a plurality of images of a sample object, such as apiece of fabric, for example. As will be described in more detailhereafter, each of the images is preferably captured when the sampleobject is being lit from a different direction.

FIGS. 2 and 3 depict an exemplary image capture unit 58 that may beutilized to capture images of the sample object 86. In this exemplaryembodiment, the image capture unit 58 comprises a dome structure 72having a digital camera 76 mounted at the top of the structure 72, asshown by FIGS. 2 and 3, although other types of structures may beemployed for mounting the camera 76 in other embodiments. In theembodiment depicted by FIGS. 2 and 3, the dome structure 72 has a hole79 through which a lens 81 of the camera 76 can receive light from theinterior of the dome structure 72. Furthermore, the dome structure 72 ofFIG. 2 preferably has a base 82 coupled to a plurality of legs 83 forsupporting the structure 72 when the structure 72 is placed on anotherbase or structure 84, such as a table or desk, for example. In apreferred embodiment, the length and width of the base 82 isapproximately 2.5 feet by 2.5 feet, and the height of the structure 72is approximately 1.25 feet, although other dimensions of the structure72 are possible in other embodiments.

A sample object 86 is preferably positioned underneath the domestructure 72, and the lens 81 of the camera 76 preferably points to andis focused on the sample object 86 such that the camera 76 automaticallycaptures an image of the sample object 86 when the camera 76 isinstructed to take a picture. As an example, the sample object 86 may beplaced on the same structure 84 upon which the dome structure 72 isresiding and may be positioned at the center of the structure 72 suchthat the sample object 86 is directly below the hole 79 and lens 81.

In the embodiment depicted by FIG. 2, a plurality of printed circuitboards (PCBs) 92 are mounted on the exterior of the dome structure 72.As shown by FIG. 4, each of the PCBs 92 preferably comprises a lightsource 95 (e.g., a light bulb, a light emitting diode, etc.) and lightactivation logic 96 for selectively activating and deactivating thelight source 95 based on commands from the texture map manager 32. Thelight source 95 of each PCB 92 preferably extends through the domestructure 72 and is exposed to the interior of the dome structure 72, asshown by FIG. 3, such that light emitted from each of the light sources95 illuminates the sample object 86. Each of the PCBs 92 and the camera76 are preferably communicatively coupled to the local interface 51(FIG. 1) and can exchange data with the texture map manager 32. Notethat, if desired, one or more controllers (not shown) on one or more ofthe PCBs 92 or between the PCBs 92 and the local interface 51 may beemployed to control the light sources 95 and/or facilitate communicationbetween the PCBs 92 and the texture map manager 32.

In an image capture phase, the texture map manager 32 periodicallytransmits, to the camera 76, a command for causing the camera 76 tocapture an image of the sample object 86. The images captured by thecamera 76 are preferably used to generate the PTM 34 and will bereferred to hereafter as “texture images.” Furthermore, the commandtransmitted by the texture map manager 32 for causing the camera 76 tocapture a texture image will be referred to hereafter as a “captureimage command.”

For each capture image command, the texture map manager 32 alsotransmits, to a different one of the PCBs 92, a command for causing thePCB's logic 96 to activate its corresponding light source 95. Such acommand will be referred to hereafter as an “activation command.” Inresponse to the activation command, the PCB's logic 96 temporarilyactivates its corresponding light source 95 causing the light source 95to flash light that briefly illuminates the sample object 86. Thetexture map manager 32 preferably controls the timing of the captureimage command and the activation command such that the sample object 86is being illuminated by the light source 95 when the camera 76 capturesan image of the sample object 86.

Note that the texture map manager 32 preferably transmits a captureimage command and an activation command for each PCB 92. Accordingly,each captured texture image corresponds to an image of the sample object86 as the sample object 86 is being illuminated by a different one ofthe light sources 95 and, therefore, from a different direction. Notethat the location of each light source 95 may be fixed, and for eachtexture image, the texture map manager 32 is preferably aware of theangle of incidence of the light that is illuminating the sample object86. In this regard, the angle of incidence of light from each lightsource 95 on the sample object 86 may be measured and programmed intothe texture map manager 32.

Each texture image captured by the camera 76 is preferably stored in thememory 42 (FIG. 1) of the texture map generating and editing system 30as a set of texture image data 97. After the texture images arecaptured, the texture map manager 32 preferably analyzes the textureimage data 97 and generates the PTM 34 based on the data 97. Morespecifically, the texture map manager 32, utilizing known orfuture-developed techniques, measures or otherwise determines the colorof each pixel of each texture image defined by the data 97. The texturemap manager 32 may then utilize the measured color values to derivecolor component values and/or luminosity equations for the texels of thePTM 34.

In this regard, the camera 76 and the sample object 86 preferably remainin a fixed position as the texture images are being captured during theimage capture phase. Thus, pixels at the same set of coordinates fordifferent texture images correspond to the same region or point on thesample object's surface. Moreover, each set of coordinates preferablycorresponds to a different texel. Furthermore, to determine the colorcomponent values for a particular texel of the texture map 34, thetexture map manager 32, for each texture image, determines the pixel'sluminosity value (e.g., a value indicative of the pixel's color andbrightness) at the set of coordinates that correspond to the particulartexel. This may be achieved, for example, by identifying the particularset of coordinates for the texel and then retrieving, from each of thetexture images, the luminosity value measured for the image's pixel thatis located at or mapped to the identified set of coordinates. Themanager 32 then averages the retrieved luminosity values to determine anaveraged luminosity value for the particular texel. Values indicative ofthe color components of this averaged value are then utilized as thecolor component values (R, G, and B) for the particular texel.

To determine the luminosity equation for the particular texel, thetexture map manager 32, for each texture image, preferably plots aluminosity value associated with the texel's corresponding set ofcoordinates. This may be achieved, for example, by identifying theparticular set of coordinates for the texel and then retrieving, fromeach of the texture images, the luminosity value measured for theimage's pixel that is located at the identified set of coordinates, asdescribed above for determining the color component values. Eachretrieved luminosity value may then be divided by the aforementionedaveraged color value to derive a luminosity value (L) that isindependent of the pixel's color. This luminosity value (L) may then beplotted as a function of the angle of incidence associated with theretrieved luminosity value.

To better illustrate the plotting described above, assume that a texelassociated with or mapped to coordinates (x,y) of the sample object 86is selected. FIG. 5 depicts the sample object 86 wherein an arrow 101represents the direction of light illuminating the object 86 when thecamera 76 (FIG. 2) is capturing one of the texture images defined by thetexture data 97 (FIG. 1). In particular, the arrow 101 indicates thedirection from which the light source 95 illuminating the object 86 ispositioned relative to the object 86. Note that the angle of incidenceof the light illuminating the object 86 has two angular components, a“u” component and a “v” component. Each of these components is depictedin FIGS. 6 and 7, respectively.

Moreover, for the texture image captured in this example, angularcomponents (u) and (v) are known values, and the pixel at coordinates(x,y) is associated with a measured luminosity value (L_(measured)) bythe set of image data 97 defining the captured image. The measuredluminosity value (L_(measured)) may be converted into a luminosity value(L) that is indicative of brightness only by dividing the measuredluminosity value (L_(measured)) by an averaged luminosity valuerepresenting the average color of the pixel in the different imagesdefined by the data 97. After determining the foregoing luminosity value(L), a three dimensional plot of (L, u, and v) can be performed, asshown by FIG. 8, in which point 104 represents the plotted value. In apreferred embodiment, such a plot is made for the same pixel (i.e., thepixel at the same set of coordinates) of each texture image capturedduring the image capture phase.

After performing a plot for the same pixel of each texture image, asdescribed above, the texture map manager 32 preferably fits athree-dimensional curve (which represents an approximation of (L) as afunction of (u) and (v)) to the plotted points. In a preferredembodiment, the well-known least squares approximation is employed bythe texture map manager 32 to perform a curve fit, although othertechniques for curve fitting may be performed in other embodiments. Thetexture map manager 32 also preferably derives a variable expression,such as an equation, representing the fitted curve or, in other words,representing an approximation of (L). In a preferred embodiment whereleast squares approximation is utilized for curve fitting, the resultingequation derived by the manager 32 is a bi-quadratic polynomialrepresented as:L=F(u,v)=Au ² +Bv ² +Cuv+Du+Ev+F,where (A, B, C, D, E, and F) are all constants and where (u) and (v) arevariables. Note that this equation is representative of the luminositybehavior of the selected texel (i.e., the texel associated withcoordinates (x,y)) as a function of (u) and (v), which are angularcomponents of the texel's angle of incidence. Data defining the texel'sluminosity equation is preferably stored in memory 42 as a portion ofthe PTM 34. Moreover, the aforementioned techniques are preferablyrepeated for each texel such that a luminosity equation, in addition toa set of color component values (R, G, and B), is derived and stored foreach texel of the PTM 34.

Once the texels of the PTM 34 are defined, the PTM 34 may be applied toone or more graphical objects by a graphical display system, such as thesystem 140 depicted by FIG. 9. Referring to FIG. 9, the system 140preferably comprises a graphics application 141 having graphical datathat defines one or more objects to be rendered by the system 140, andthe system 140 preferably comprises a graphics adapter 142 for renderingthe graphical objects defined by the graphics application 141. Thisgraphics adapter 142 preferably comprises a texture mapper 143 forapplying, to an object's surface, the PTM 34 generated and/or edited bythe system 30 (FIG. 1) described above. Note that the graphicsapplication 141 and the graphics adapter 142, including the texturemapper 143, may be implemented in software, hardware, or any combinationthereof.

A preferred embodiment of the graphical display system 140 of FIG. 9comprises one or more conventional processing elements 146, such as adigital signal processor (DSP) or a central processing unit (CPU), thatcommunicate to and drive the other elements within the system 140 via alocal interface 151, which can include one or more buses. Furthermore,an input device 154, for example, a keyboard or a mouse, can be used toinput data from a user of the system 140, and an output device 156, forexample, a screen display or a printer, can be used to output data tothe user.

During operation, the graphics adapter 142 preferably receives graphicaldata (e.g., primitives) from the graphics application 141 and rendersthe graphical data to the output device 156. When a graphical object isbeing rendered by the graphics adapter 142, the texture mapper 143 mayapply the texture defined by the PTM 34 to the surface of the graphicalobject. For illustrative purposes, assume that a graphical object beingrendered by the graphics adapter 142 has a surface, referred tohereafter as the “textured surface,” to which the texture of the PTM 34is to be applied.

For each pixel of the textured surface, the texture mapper 143, based onthe coordinates of the pixel, maps the pixel to one or more texels ofthe PTM 34. As set forth above, each texel of the PTM 34 of a preferredembodiment is associated with a luminosity equation in addition to colorcomponent values. Moreover, if a single texel is mapped to a pixel ofthe textured surface, the texture mapper 143 preferably calculates aluminosity value (L) for the mapped texel based on the texel'sluminosity equation.

To calculate such a luminosity value (L), the texture mapper 143determines the direction that light illuminates the pixel or, in otherwords, determines the values of (u) and (v) for the pixel. In thisregard, the graphics application 141 preferably specifies a light sourcedirection indicative of a direction of light that is illuminating theprimitives generated by the graphics application 141. For eachprimitive, the graphics application 141 also preferably provides dataindicative of the primitive's orientation and, more specifically,indicative of a direction that is perpendicular to the primitive'ssurface. This data is sometimes referred to as a “primitive normal.”Knowing the light direction and the primitive normal, the texture mapper143 may calculate the angle of incidence of the light for the primitiveor, in other words, may calculate the primitive's (u) and (v) values.The texture mapper 143 may then substitute these values for thevariables (u) and (v), respectively, in the luminosity equation beingutilized to calculate the luminosity value being applied to the pixel.Once this is done, all of the values except (L) in the luminosityequation are known, and the texture mapper 143 can, therefore, solve theequation for (L).

In the present embodiment, the calculated luminosity value (L) is avalue indicative of the texel's brightness only and is independent ofthe mapped pixel's color. Thus, to derive the color values of the texel,the texture mapper 143 preferably combines the calculated luminosityvalue (L) with the texel's color component values (R, G, and B) storedin the PTM 34.

More specifically, the texture mapper 143 preferably multiplies thecalculated luminosity value (L) to each color component value (R, G, andB) of the texel to generate new color component values, referred tohereafter as “calculated color component values (R_(C), G_(C), andB_(C)).” The texture mapper 143 then applies the calculated colorcomponent values (R_(C), G_(C), and B_(C)) to the mapped pixel accordingto well-known or future-developed texture mapping techniques. In thisregard, the texture mapper 143 may apply the texel's calculated colorcomponent values to the mapped pixel according to the same techniquesutilized by conventional texture mappers in applying a texel's constantcolor component values to a mapped pixel.

If multiple texels of the PTM 34 are mapped to the pixel of the texturedsurface, then the texture mapper 143 is preferably designed tointerpolate new color component values (R′, G′, and B′) and a newluminosity equation (L′) based on the color component values and theluminosity equations of the mapped texels. In this regard, it is commonfor conventional texture mappers to interpolate a texture value for apixel based on the texture values of a plurality of texels mapped to thepixel. These same interpolation techniques may be employed by thetexture mapper 143 to interpolate the new color component values (R′,G′, and B′) based on the corresponding color components (R, G, and B)from the mapped texels.

Furthermore, each luminosity equation, in a preferred embodiment,comprises a set of constants (A, B, C, D, E, and F). The texture mapper143 preferably utilizes the constants of the luminosity equations of themapped texels to derive a new set of constants (A′, B′, C′, D′, E′, andF′) for the luminosity equation being interpolated by the mapper 143.

For example, the mapper 143 may be configured to interpolate a newconstant (A′) based on the corresponding constant (A) from each of theluminosity equations of the mapped texels. As noted above, it is commonfor conventional texture mappers to interpolate a color value for apixel based on the color values of a plurality of texels mapped to thepixel. Such interpolation techniques may be employed, by the texturemapper 143, to interpolate (A′) based on the corresponding constant (A)from the luminosity equations of the mapped texels. Further note thateach of the constants (B′, C′, D′, E′, and F′) may be similarlyinterpolated based on the corresponding constants (B, C, D, E, and F),respectively, from the luminosity equations of the mapped texels.

Once the new set of constants (A′, B′, C′, D′, E′, and F′) isdetermined, the new luminosity equation is defined and may be expressedas:L′=F(u,v)=A′u ² +B′v ² +C′uv+D′u+E′v+F′,where (u) and (v) are variables representing the angular components ofthe angle of incidence of the light illuminating the pixel. Afterdetermining this new luminosity equation and the values of (u) and (v),the texture mapper 143 preferably calculates a luminosity value (L′)based on the new luminosity equation. The texture mapper 143 preferablymultiplies each of the new color component values (R′, G′, and B′) bythe calculated luminosity value (L′) to generate a calculated set ofcolor component values (R_(C), G_(C), and B_(C)) and then applies thecalculated color component values to the mapped pixel. In applying thecalculated color component values (R_(C), G_(C), and B_(C)) to themapped pixel, the texture mapper 143 may utilize the same techniquesemployed by conventional texture mappers in applying a texel's colorcomponent values to a mapped pixel.

It should be noted that various modifications may be made to theembodiments described above without departing from the principles of thepresent invention. For example, in the embodiment described above, eachtexel of a PTM 34 comprises color component values (R, G, and B) and aluminosity equation (L). Furthermore, when applying a texel to a pixel,the texture mapper 143 generally calculates (L) based on light positionand multiplies each color component value (R, G, and B) by thecalculated value (L). However, if desired, the color component values(R, G, and B) may be respectively combined (e.g., multiplied) with theluminosity equation (L) to generate three new luminosity equations(L_(red), L_(green), and L_(blue)), referred to hereafter as “colorcomponent luminosity equations.” Each of the color component luminosityequations may then be stored in the PTM 34 to define a texel in lieu ofthe color component values (R, G, and B) and the single luminosityequation (L).

During texture mapping, each of the color component luminosity equations(L_(red), L_(green), and L_(blue)) may be solved based on lightdirection in the same way that the luminosity equation (L) is solved inthe embodiment previously described above. Solving the color componentluminosity equations generates three color component luminosity values(L_(red), L_(green), and L_(blue)). Note that each of the colorcomponent luminosity values (L_(red), L_(green), and L_(blue)), similarto the calculated color component values (R_(C), G_(C), and B_(C))described above, is a value indicative of one of the texel's colorcomponents that is to be applied to the mapped pixel. In this regard,the color component luminosity values (L_(red), L_(green), and L_(blue))are indicative of both brightness and color. Moreover, the colorcomponent luminosity values (L_(red), L_(green), and L_(blue)) may beapplied to the mapped pixel in the same way that conventional texturemappers apply the constant color component values of a texel of aconventional texture map to a corresponding pixel.

It should be noted that defining multiple color component luminosityequations (L_(red), L_(green), and L_(blue)) for each texel likelyrequires more data than defining three color component values (R, G, andB) and a single luminosity equation (L) for each texel. Therefore, insome embodiments, it may be desirable to define the texels of a PTM 34with color component values (R, G, and B) and a luminosity equation (L)according to previously described embodiments.

However, in some embodiments, utilizing color component luminosityequations may help to improve texture mapping results. In this regard,in generating a PTM 34, the texture map manager 32 may be configured tosubdivide the sample color value measured for each image into colorcomponents (e.g., red, green, and blue). More specifically, the texturemap manager 32, when analyzing the texture image data 97, may measure orotherwise determine the luminosity of each color component. Then, foreach texel, the texture map manager 32 may determine a color componentluminosity equation for each color component rather than a singleluminosity equation (L), as previously described above.

Note that in determining color component luminosity equations (L_(red),L_(green), and L_(blue)) in such an embodiment, the texture map manager32 may employ techniques similar those described above in a preferredembodiment for determining a texel's luminosity equation (L). Forexample, to determine a red color component luminosity equation(L_(red)) for a texel, the texture map manager 32 (FIG. 1) may measure ared luminosity value (L_(red)) for the corresponding pixel in eachdigital image defined by the texture image data 97. The manager 32 maythen plot each measured red luminosity value (L_(red)) as a function ofthe angle of incidence associated with the measured red luminosityvalue, similar to how the manager 32 in the previously describedembodiment plots (L) as a function of the angle of incidence associatedwith (L). However, note that (L_(red)) in the present embodiment is avalue indicative of both color and brightness, whereas (L) in thepreviously described embodiment is indicative of brightness only.

After plotting (L_(red)) for the corresponding pixel in each imagedefined by the texture data 97, the texture map manager 32 may fit athree-dimensional curve to the plotted points and derive an equation(L_(red)) of this curve. Such an equation represents an approximation ofthe texel's luminosity behavior for the red color component and may beexpressed as:L _(red) =F(u,v)=(A _(red))u ²+(B _(red))v ²+(C _(red))uv+(D _(red))u+(E_(red))v+F _(red).Similar techniques may be employed to determine color componentluminosity equations for the other color components of the texel. Forexample, when the other color components are blue and green, theluminosity equations for the other color components may be expressed as:L _(blue) =F(u,v)=(A _(blue))u ²+(B _(blue))v ²+(C _(blue))uv+(D_(blue))u+(E _(blue))v+F _(blue);andL _(green) =F(u,v)=(A _(green))u ²+(B _(green))v ²+(C _(green))uv+(D_(green))u+(E _(green))v+F _(green).Moreover, in the present embodiment, each texel of the PTM 34 maycomprise a different luminosity equation (L_(red), L_(blue), orL_(green)) for each color component. Each of these equations may then beused, as described above, to apply a color component of the texel to acorresponding pixel.

Note that when color component luminosity equations are separatelygenerated by the manager 32 as just described above, the luminositybehavior of each color component may be different. In other words, thered color component of a texel may appear to respond to changes in lightdirection in a different manner than the other color components of thetexel. Such an effect may help to enhance the realism of the texturedefined by the PTM 34.

It should also be noted that, in a preferred embodiment, as describedabove, the luminosity equations, including the color componentluminosity equations, are represented as bi-quadratic polynomials.However, in other embodiments, the luminosity equations may be definedby other types of equations. For example, if desired, bi-cubicpolynomials could be utilized to express the luminosity equations. Insuch embodiments, similar techniques as those described above for theaforedescribed embodiments may be employed in order to determine andapply luminosity values to different pixels.

To better illustrate the texture map generation and texture mappingprocesses described above, assume that the graphics application 141(FIG. 9) comprises graphical data defining an image of a car seat.Further assume that it is desirable for a viewer to see an image of thecar seat as if the car seat is covered in a particular fabric. In apreferred embodiment, a sample of the fabric is positioned underneaththe dome structure 72 of FIG. 2 and below the camera 76. Once thisoccurs, the user preferably submits an input, via input device 54 (FIG.1), indicating that the image capture phase may commence.

In response, the texture map manager 32 selects a PCB 92, as shown byblocks 222 and 225 of FIG. 10. The texture map manager 32 then transmitsan activation command to the selected PCB 92 and transmits an imagecapture command to the camera 76 such that the camera 76 takes a pictureof the sample object 86 (i.e., the sample fabric) as the object 86 isbeing illuminated by the light source 95 of the selected PCB 92, asshown by block 226. Once the image of the object is captured, the camera76 preferably stores the captured image in memory 42 (FIG. 1) as a setof texture image data 97. Note that an image captured by a PCB 92 isassociated with a particular set of (u) and (v) values representing theangular components of the angle of incidence that the light from thePCB's light source 95 illuminates the object 86. The (u) and (v) valuesmay be predefined values stored in the system 30.

As an example, a user may physically measure or estimate the directionor angle from which the PCB's light source 95 illuminates the sampleobject 86. The user may then program the (u) and (v) components valuesinto the texture map manager 32. Then, when the camera 76 captures animage of the object 86, which the PCB's light source 95 is illuminating,the texture map manager 32 may associate the programmed (u) and (v)values with the captured image.

After the image is captured, the texture map manager 32 preferablyselects another PCB 92 and repeats the aforedescribed techniques, asshown by blocks 225-227, such that another image is captured as theobject 86 is being illuminated from a different direction by the lightsource 95 of another PCB 92. As shown by block 231, the texture mapmanager 32 preferably measures or otherwise determines the luminosity ofeach pixel within each of the texture images defined by the textureimage data 97. These measured luminosity values may then be used todetermine color component values and luminosity equations for thedifferent texels of the PTM 34.

In this regard, the texture map manager 32, in block 244 of FIG. 11,preferably selects a new texel, which is associated with a particularset of coordinate values. Then, in block 245, the texture map manager 32selects a new texture image defined by the data 97. For this selectedtexture image, the texture map manager 32 retrieves, in block 246, themeasured luminosity value (L_(measured)) for the pixel that is locatedat the particular set of coordinate values associated with the texelselected in block 244. In block 246, the texture map manager 32 alsoretrieves the (u) and (v) values associated with the texture imageselected in block 245.

After retrieving a set of (L_(measured)), (u), and (v) values in block246, the texture map manager 32 selects another texture image andrepeats blocks 245 and 246. As shown by blocks 245-247, the texture mapmanager 32 continues to repeat blocks 245 and 246 for different textureimages until block 246 has been performed for all of the texture imagesdefined by the data 97.

As shown by block 248, the texture map manager 32 then calculates anaverage, referred to hereafter as the “averaged (L),” of the measuredluminosity values (L_(measured)) retrieved via block 246. The colorcomponents of the averaged (L) are preferably utilized as the colorcomponents (R, G, and B) of the selected texel. Further, in block 249,each measured luminosity value (L_(measured)) retrieved in block 246 isconverted into a luminosity value (L) by dividing the measuredluminosity value (L_(measured)) by the averaged (L). This luminosityvalue (L) is indicative of brightness only, although the luminosityvalue (L) calculated in block 249 may be indicative of other parametersin other embodiments.

As shown by block 250, the texture map manager 32 performs a curve fit,using each set of (L), (u), and (v) values derived from a single textureimage as a different data point, and the texture map manager 32, basedon this curve fit, determines an equation for the fitted curve. Thisequation is the luminosity equation for the PTM texel selected in block244 and is stored in the PTM 34 in block 251 along with the colorcomponent values of the selected texel.

After defining and storing the luminosity equation and color componentvalues for one texel of the PTM 34 via blocks 244-251, the texture mapmanager 32 repeats blocks 244-251 for another texel that is associatedwith another set of coordinates. Indeed, the texture map manager 32preferably repeats blocks 244-251 for each different texel of the PTM34. Once a luminosity equation has been defined for each texel of thePTM 34 in this way, the PTM 34 is complete, and the process ofgenerating the PTM 34 preferably ends, as shown by block 252.

After the PTM 34 has been generated, the PTM 34 may be stored and usedby the graphical display system 140 of FIG. 9. In this regard,continuing with the illustrative car seat example, the graphicsapplication 141 may generate primitives defining the car seat. When thegraphics adapter 142 is rendering a pixel of the car seat's surface, thetexture mapper 143 preferably applies the PTM 34 to the pixel. Moreparticularly, when rendering the pixel, the texture mapper 143determines, in block 275 of FIG. 12, whether the pixel defines a portionof the car seat surface. If so, the texture mapper 143 maps one or moretexels of the PTM 34 to the pixel, as shown by block 278.

If a single texel is mapped to the pixel, then the mapper 143 calculatesa luminosity value (L) from the mapped texel's luminosity equationstored in the PTM 34, as shown by blocks 282 and 284. Note that thisluminosity value is based on the angle of incidence for the light thatilluminates the pixel. As set forth above, this angle of incidence maybe determined from data provided by the graphics application 141. Aftercalculating a luminosity value (L) from the mapped texel's luminosityequation, the mapper 143 multiplies each of the color component values(R, G, and B) of the mapped texel by the calculated luminosity value (L)to generate a set of calculated color component values (R_(C), G_(C),and B_(C)), as shown by block 286. Also in block 286, the texture mapper143 applies or assigns the calculated color component values (R_(C),G_(C), and B_(C)) to the pixel.

If multiple texels of the PTM 34 are mapped to the pixel in block 278,then the texture mapper 143 is preferably designed to interpolate a newluminosity equation based on the luminosity equations of the mappedtexels, as shown by blocks 282 and 288. After interpolating a newluminosity equation in block 288, the texture mapper 143 calculates aluminosity value (L) from the interpolated luminosity equation, as shownby block 289. Note that this luminosity value is based on the angle ofincidence for the light that illuminates the pixel.

As shown by block 290, the mapper 143 interpolates a set of colorcomponent values (R, G, and B) based on the color component values ofthe mapped texels. The mapper 143 then multiples each of theinterpolated color component values by the calculated luminosity value(L) to generate a set of calculated color component values (R_(C),G_(C), and B_(C)), as shown by block 292. Also in block 292, the mapper143 applies or assigns the calculated color component values (R_(C),G_(C), and B_(C)) to the pixel.

After color component values are assigned to the pixel in block 286 or292, the pixel is rendered by the graphics adapter 142. The outputdevice 156 then displays the pixel based on the color component valuesassigned to the pixel by the texture mapper 143.

Note that, as the texture mapper 143 receives more primitives of the carseat's surface, tiling techniques may be employed to apply the PTM 34across the surface of the car seat. Tiling techniques for applying atexture map across the surface of a graphical object are generallywell-known in the art.

Once each of the pixels of the car seat is rendered by the graphicsadapter 142, the display device 156 displays an image of the car seat.This displayed car seat appears to be covered with the fabric from whichthe texture image data 97 is based. In other words, the displayed carseat appears to be covered with the fabric (i.e., the sample object 86)positioned underneath the dome structure 72 (FIG. 2).

Furthermore, by defining the luminosity equations as a function of lightdirection, as described above, the luminosity equations take intoaccount the phenomena that different point elements of the sample fabricmay appear to respond to changes in light direction differently. Thus,utilization of the luminosity equations to calculate the color valuesthat are applied to the car seat by the texture mapper 143 helps tocreate a more realistic image of the car seat.

It should be noted that, in a preferred embodiment, the user of thesystem 140 may submit an input, via input device 154, for changing thedirection from which the graphical object (e.g., the car seat) is beingilluminated. For example, the user may submit an input for moving asimulated light source illuminating the graphical object from one modelposition to a different model position. In response to such an input,the graphics application 141 preferably calculates a new angle ofincidence for each primitive of the graphical object based on the newposition of the light source relative to the graphical object. Accordingto the aforedescribed rendering process, the new angle of incidenceaffects the luminosity values calculated from the luminosity equationsin blocks 284 and 289 of FIG. 12. More specifically, a different angleof incidence may cause the texture mapper 143 to calculate a differentluminosity value (L) from the same luminosity equation.

FIGS. 13 and 14 depict an exemplary process for generating a PTM 34having texels defined by color component luminosity equations (L_(red),L_(green), and L_(blue)). As can be seen by comparing FIGS. 13 and 14 toFIGS. 10 and 11, the foregoing process may be similar to the PTMgeneration process depicted by FIGS. 10 and 11. Indeed, blocks 422, 425,426, 427, 431, and 444 of FIGS. 13 and 14 are respectively the same asblocks 222, 225, 226, 227, 231, and 244 of FIGS. 10 and 11. However, inthe process depicted by FIGS. 13 and 14, the texture map manager 32,after performing block 444, selects a color component (e.g., red, green,or blue) in block 446. Then, after selecting a new texture image inblock 445, the texture map manager 32, in block 455, retrieves theselected component of the measured luminosity value (L_(measured)) forthe pixel that is located at the set of coordinate values associatedwith the texel selected in block 444. The texture map editor 32 alsoretrieves the angular components (u) and (v) for the angle of incidenceof the texture image selected in block 455. Note, in particular, thatthe luminosity value retrieved in block 455 is a color component of theoverall luminosity value measured for the associated pixel.

For example, if the red color component is selected in block 446, thenthe manager 32 preferably retrieves the red color component of themeasured luminosity value (L_(measured)). Therefore, the luminosityequation later generated in block 467 and stored in block 468 preferablycorresponds to a representation of the luminosity behavior of theselected color component only. As depicted by block 469, theaforedescribed process for defining and storing a color componentluminosity equation for the selected texel is repeated for eachdifferent color component of the selected texel. Further, as shown byblock 472, the process depicted by FIG. 14 continues until colorcomponent luminosity equations have been defined for all texels.Moreover, once the process depicted by FIGS. 13 and 14 is completed,each texel preferably comprises color component equations (L_(red),L_(green), and L_(blue)). Note that changes to the aforedescribedalgorithm depicted by FIGS. 13 and 14 or different algorithms may beimplemented to generate a PTM 34 in other examples.

FIG. 15 depicts an exemplary process for applying a PTM 34, such as onegenerated by the process depicted by FIGS. 13 and 14, that has texelsdefined by color component luminosity equations (L_(red), L_(green), andL_(blue)). When the graphics adapter 142 is rendering a pixel, thetexture mapper 143 preferably applies the PTM 34 to the pixel. In thisregard, when rendering the pixel, the texture mapper 143 determines, inblock 515, whether the pixel defines a portion of a surface of agraphics object, such as the car seat described above. If so, thetexture mapper 143 maps one or more texels of the PTM 34 to the pixel,as shown by block 528.

If a single texel is mapped to the pixel, then the mapper 143 evaluatesthe color component luminosity equations (L_(red), L_(green), andL_(blue)) defined by the mapped texel, as shown by blocks 532 and 541.Note that each color component luminosity equation (L_(red), L_(green),and L_(blue)) is based on the angle of incidence for the light thatilluminates the pixel. As set forth above, this angle of incidence maybe determined from the graphics application 141 in order to calculatecolor component luminosity values (L_(red), L_(green), and L_(blue))from the color component luminosity equations in block 541. Aftercalculating the color component values (L_(red), L_(green), andL_(blue)) in block 541, the mapper 143 applies or assigns the calculatedcolor component values (L_(red), L_(green), and L_(blue)) to the pixel,as shown by block 543. In this regard, the mapper 143 assigns the colorcomponent luminosity value (L_(red)) to the pixel as the pixel's redcolor component value (R). The mapper 143 also assigns the colorcomponent luminosity values (L_(green) and L_(blue)) to the pixel as thepixel's green and blue color component values (G and B), respectively.

If multiple texels of the PTM 34 are mapped to the pixel in block 528,then the texture mapper 143 is preferably designed to interpolate a newset of color component luminosity equations (L′_(red), L′_(green), andL′_(blue)) based on the color component luminosity equations (L_(red),L_(green), and L_(blue)) of the mapped texels, as shown by blocks 532and 545. This may be achieved by interpolating each constant (A′, B′,C′, D′, E′, and F′) of the interpolated equation based on thecorresponding constants (A, B, C, D, E, and F) of the correspondingcolor component luminosity equations (L_(red), L_(green), and L_(blue))of the mapped texels.

For example, to interpolate the constant (A_(red)) of the new red colorcomponent equation (L′_(red)), the texture mapper 143 may calculate aweighted average (weighted based on the pixel's position relative to themapped texels) of the constant (A_(red)) from each red color componentluminosity equation (L_(red)) of the mapped texels. Furthermore, theother constants (B′_(red), C′_(red), D′_(red), E′_(red), and F′_(red))of the new red color component luminosity equation (L′_(red)) may berespectively interpolated, via similar techniques, from the constants(B_(red), C_(red), D_(red), E_(red), and F_(red)) of the red colorcomponent luminosity equations (L_(red)) of the mapped texels.

After interpolating new color component luminosity equations (L′_(red),L′_(green), and L′_(blue)) in block 545, the texture mapper 143preferably evaluates the interpolated color component luminosityequations (L′_(red), L′_(green), and L′_(blue)), as shown by block 548.Note that each interpolated color component luminosity equation(L′_(red), L′_(green), and L′_(blue)) is based on the angle of incidencefor the light that illuminates the pixel. As set forth above, this angleof incidence may be determined from data provided by the graphicsapplication 141 in order to calculate color component luminosity values(L′_(red), L′_(green), and L′_(blue)) from the color componentluminosity equations in block 548. After calculating the color componentvalues (L′_(red), L′_(green), and L′_(blue)) in block 548, the mapper143 applies or assigns the calculated color component values (L′_(red),L′_(green), and L′_(blue)) to the pixel, as shown by block 551.

After color component values are assigned to the pixel in block 543 or551, the pixel is rendered by the graphics adapter 142. The outputdevice 156 then displays the pixel based on the color component valuesassigned to the pixel by the texture mapper 143 in block 543 or 551.

To facilitate various graphical rendering techniques, such as tiling,for example, it is generally desirable for a texture defined by atexture map to be oriented in a particular direction. Unfortunately, thetexture is not always oriented in a desirable manner upon generation ofthe texture map. Thus, it may be desirable for the texture to be rotatedsome desired angle after the texture map has been generated.

To rotate a texture of a conventional texture map, the data definingeach texel of the texture map is normally moved from one texel toanother texel such that the texture defined by the texture map appearsto be rotated by some desired angle when rendered. The foregoing may beachieved by changing the memory locations of the texel color values suchthat different texel color values are associated with different texelcoordinates. Alternatively, the texel color values may be moved todifferent texels by updating the texel coordinates of each texel suchthat the texel color values are associated with different texelcoordinates. Since the data of a texel is normally a constant colorvalue or a set of color component values, the texel data does notnormally change as it is being moved from one texel to another.

However, for PTMs 34, the data of each texel may comprise, in lieu of orin addition to constant color values or color component values, at leastone luminosity equation or expression that is a function of lightposition or some other variable parameter. As described above, such aluminosity equation may comprise information pertaining to the texel'sorientation relative to light direction. Moreover, if the texel data ofthe texels are moved to different texels in an effort to rotate thetexture defined by a PTM 34, then each texel's orientation relative to agiven light direction changes. Therefore, if a texel's orientationinformation is not updated when the texture is rotated, then the texel'sluminosity equation may less accurately reflect the true luminositybehavior of the texel.

Therefore, in an effort to maintain more accurate luminosity equations,the texture map manager 32 preferably updates the luminosity equationsof the PTM 34 when the texture defined by the PTM 34 is rotated, asshown by blocks 401 and 403 of FIG. 16. The following is a descriptionof how luminosity equations may be updated by the texture map manager 32to account for a rotation, by some angle (x), of the texture defined bythe PTM 34.

As previously set forth above, the luminosity equation for a particulartexel may be expressed as:L=F(u,v)=Au ² +Bv ² +Cuv+Du+Ev+F,where (A, B, C, D, E, and F) are constants and where (u) and (v) arevariables representing the angular components of the texel's angle ofincidence for light from a light source. Rotating a texel by an angle(+x) implies that the orientation of the texel relative to the lightsource has changed and that the texel's angle of incidence for lightfrom the light source has, therefore, changed as well. The newluminosity equation (L′) can be expressed as a function of the previousluminosity equation (L):L′(u,v)=L(u′,v′),where (u′,v′) represent angular components of the new angle of incidencefor the texel. In expanded form, the foregoing equation becomes:A′u ² +B′v ² +C′uv+D′u+E′v+F′=A(u′)² +B(v′)² +Cu′v′+Du′+Ev′+F.Moreover, u′ and v′ can be expressed as:u′=cos(−x)u−sin(−x)vandv′=sin(−x)u+cos(−x)v.Let K=cos(−x), L=sin(−x), M=−sin(−x), and N=cos(−x). Accordingly, u′ andv′ may be expressed as:u′=Ku+Mvandv′=Lu+Nv.Substituting for u′ and v′ in the expanded equations for L′(u,v) andL(u′,v′) yields:A′u ² +B′v ² +C′uv+D′u+E′v+F′=A(K ² u ² +M ² v ²+2KMuv)+B(L ² u+N ² v²+2LNuv)+C(KLu ² +KNuv+MLuv+MN ²)+D(Ku+Mv)+E(Lu+Nv)+F.By collecting and associating u² terms, the following equations can bederived:A′=AK ² +BL ² +CKL,B′=AM ² +BN ² +CMN,C′=2AKM+2BLN+CKN+CML,D′=DK+EL,E′=DM+EN,andF′=F.Thus, the new luminosity equation for a texel, after rotating the texelby an angle (+x) may be written as:L′(u,v)=F(u,v)=(AK ² +BL ² +CKL)u ²+(AM ² +BN ² +CMN)v²+(2AKM+2BLN+CKN+CML)uv+(DK+EL)u+(DM+EN)v+F,where K=cos(x), L=sin(−x), M=−sin(−x), and N=cos(−x). Note that thisequation will be referred to hereafter as the “new luminosity equation.”

Thus, when rotating the texture of the PTM 34 by an angle (+x), thetexture map manager 32 preferably moves the texel data, includingluminosity equations, of the PTM 34 from one texel to another such thateach texel is rotated by the angle (+x). The foregoing may beaccomplished by changing the memory locations of the luminosityequations such that each equation is associated with a different texel,or the texel coordinates of each texel may be updated such that the sameeffect is achieved. In moving texel data of one texel to another texel,the texture map manager 32 is preferably configured to change the movedluminosity equation from L(u,v) to L′(u,v) according to the newluminosity equation set forth above in order to compensate for thetexture rotation. Thus, the moved equation better represents theluminosity behavior of the new texel as a function of light direction.

Note that similar techniques may be employed to rotate a PTM 34 havingtexels defined by color component luminosity equations (L_(red),L_(green), and L_(blue)). In this regard, when performing texturerotation, the manager 32 is described above as changing a luminosityequation from L(u,v) to L′(u,v). When color component luminosityequations are utilized to define the texels of a PTM 34, the sametexture rotation techniques may be employed to change: L_(red)(u,v) toL′_(red)(u,v); L_(blue)(u,v) to L′_(blue)(u,v); and L_(green)(u,v) toL′_(green)(u,v).

As an example, assume that the color component luminosity equationsL_(red)(u,v), L_(blue)(u,v), and L_(green)(u,v) are moved from one texelto another texel in order to rotate the texture defined by the PTM 34 byan angle x. If L_(red)(u,v) is expressed as:L _(red)(u,v)=(A _(red))u ²+(B _(red))v ²+(C _(red))uv+(D _(red))u+(E_(red))v+F _(red).then L′_(red)(u,v) may be expressed as:L′ _(red)(u,v)=(A _(red) K ² +B _(red) L ² +C _(red) KL)u ²+(A _(red) M² +B _(red) N ² +C _(red) MN)v ²+(2A _(red) KM+2B _(red) LN+C _(red)KN+C _(red) ML)uv+(D _(red) K+E _(red) L)u+(D _(red) M+E _(red) N)v+F_(red),where K=cos(x), L=sin(−x), M=−sin(−x), and N=cos(−x). Further, ifL_(blue)(u,v) is expressed as:L _(blue)(u,v)=(A _(blue))u ²+(B _(blue))v ²+(C _(blue))uv+(D_(blue))u+(E _(blue))v+F _(blue),then L′_(blue)(u,v) may be expressed as:L′ _(blue)(u,v)=(A _(blue) K ² +B _(blue) L ² +C _(blue) KL)u ²+(A_(blue) M ² +B _(blue) N ² +C _(blue) MN)v ²+(2A _(blue) KM+2B _(blue)LN+C _(blue) KN+C _(blue) ML)uv+(D _(blue) K+E _(blue) L)u+(D _(blue)M+E _(blue) N)v+F _(blue),where K=cos(x), L=sin(−x), M=−sin(−x), and N=cos(−x). In addition, ifL_(green)(u,v) is expressed as:L _(green)(u,v)=(A _(green))u ²+(B _(green))v ²+(C _(green))uv+(D_(green))u+(E _(green))v+F _(green),then L′_(green)(u,v) may be expressed as:L′ _(green)(u,v)=(A _(green) K ² +B _(green) L ² +C _(green) KL)u ²+(A_(green) M ² +B _(green) N ² +C _(green) MN)v ²+(2A _(green) KM+2B_(green) LN+C _(green) KN+C _(green) ML)uv+(D _(green) K+E _(green)L)u+(D _(green) M+E _(green) N)v+F _(green),where K=cos(x), L=sin(−x), M=−sin(−x), and N=cos(−x).

1. A texture mapping system, comprising: a processor; memory for storinga parametric texture map, the parametric texture map having a pluralityof texels defining a first texture, at least one of the texels defininga variable expression that defines a luminosity parameter as a functionof light direction; and a texture map manager configured to perform arotation of the first texture thereby providing a parametric texture mapdefining a second texture that is rotated relative to the first texture,the texture map manager further configured to define a variableexpression for a texel of the parametric texture map defining the secondtexture by adjusting the variable expression of the one texel tocompensate for a change in relative light direction resulting from therotation.
 2. The system of claim 1, wherein the variable expression ofthe one texel defines a luminosity behavior for the one texel.
 3. Thesystem of claim 1, wherein the variable expression of the one texel isdefined according to the following equation:F(u,v)=Au ² +Bv ² +Cuv+Du+Ev+F, wherein A, B, C, D, E, and F areconstants, and wherein u and v are components of a light vector.
 4. Thesystem of claim 3, wherein the texture map manager is configured toadjust the variable expression of the one texel, in response to therotation, such that the variable expression for the texel of theparametric texture map defining the second texture is defined accordingto the following equation:F(u,v)=(AK ² +BL ² +CKL)u ²+(AM ² +BN ² +CMN)v²+(2AKM+2BLN+CKN+CML)uv+(DK+EL)u+(DM+EN)v+F, wherein K=cos(x),L=sin(−x), M=−sin(x), N=cos(−x), and x is indicative of an angle thatthe parametric texture map is rotated via the rotation.
 5. Acomputer-readable medium encoded with a computer executable program, theprogram comprising: logic for rotating a texture defined by a parametrictexture map, the parametric texture map having a plurality of texels, atleast one of the texels defining a variable expression that defines aluminosity parameter as a function of light direction; and logic forcompensating the variable expression of the one texel for a change inrelative light direction resulting from a rotation of the texture by therotating logic, wherein the compensating logic compensates for thechange by adjusting the variable expression based on an angle ofrotation for the texture to define a new variable expression definingthe luminosity parameter for the rotated texture.
 6. A texture mappingsystem, comprising: means for rotating a texture defined by a parametrictexture map using a processor, the parametric texture map having aplurality of texels, at least one of the texels defining a variableexpression that defines a luminosity parameter as a function of lightdirection; and means for compensating the variable expression of the onetexel for a change in relative light direction resulting from a rotationof the texture by the rotating means, wherein the compensating meanscompensates for the change by adjusting the variable expression based onan angle of rotation for the texture to define a new variable expressiondefining the luminosity parameter for the rotated texture.
 7. A texturemapping method, comprising: rotating a texture defined by a parametrictexture map using a processor, the parametric texture map having aplurality of texels, at least one of the texels defining a variableexpression that defines a luminosity parameter as a function of lightdirection; and compensating for a change in relative light directionresulting from the rotating, the compensating comprising adjusting thevariable expression of the one texel thereby defining a new variableexpression that defines the luminosity parameter for the rotatedtexture.
 8. The method of claim 7, further comprising indicating, viathe variable expression of the one texel, a luminosity behavior for theone texel.
 9. The method of claim 7, wherein the variable expression ofthe one texel is defined according to the following equation:F(u,v)=Au ² +By ² +Cuv+Du+Ev+F, wherein A, B, C, D, E, and F areconstants, and wherein u and v are components of a light vector.
 10. Themethod of claim 9, wherein the new variable expression is definedaccording to the following equation:F(u,v)=(AK ² +BL ² +CKL)u ²+(AM ² +BN ² +CMN)v²+(2AKM+2BLN+CKN+CML)uv+(DK+EL)u+(DM+EN)v+F, wherein K=cos(x),L=sin(−x), M=−sin(x), N=cos(−x), and x is indicative of an angle thatthe texture is rotated via the rotating.
 11. The system of claim 7,further comprising: applying the rotated texture to a graphical objectbased on the new variable expression; and displaying the graphicalobject.
 12. A texture mapping method, comprising: rotating a texturedefined by a parametric texture map using a processor, the parametrictexture map having a plurality of texels, at least one of the texelsdefining a variable expression that defines a luminosity parameter as afunction of light direction; and compensating the variable expression ofthe one texel for a change in relative light direction resulting fromthe rotating, wherein the compensating comprises adjusting the variableexpression of the one texel based on an angle of rotation of the texturethereby defining a variable expression for a texel that defines aportion of the rotated texture.
 13. The method of claim 12, furthercomprising indicating, via the variable expression of the one texel, aluminosity behavior for the one texel.
 14. The method of claim 12,wherein the variable expression of the one texel is defined according tothe following equation:F(u,v)=Au ² +By ² +Cuv+Du+Ev+F, wherein A, B, C, D, E, and F areconstants, and wherein u and v are components of a light vector.
 15. Themethod of claim 14, wherein the variable expression for the texeldefining the portion of the second texture is defined according to thefollowing equation:F(u,v)=(AK ² +BL ² +CKL)u ²+(AM ² +BN ² +CMN)v²+(2AKM+2BLN+CKN+CML)uv+(DK+EL)u+(DM+EN)v+F, wherein K=cos(x),L=sin(−x), M=−sin(x), N=cos(−x), and x is indicative of an angle thatthe texture is rotated via the rotating.
 16. The system of claim 12,further comprising: applying the rotated texture to a graphical objectbased on the variable expression for the texel defining the portion ofthe second texture; and displaying the graphical object.